home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 April: Penguin on DISC / ADC Developer CD (1993-04) (''Penguin On DISC'')_iso / Dev.CD Apr 93.iso / Utilities / MPW Interfaces 7.1 Beta / AIncludes / SysEqu.a < prev    next >
Encoding:
Text File  |  1992-08-28  |  54.5 KB  |  1,399 lines  |  [TEXT/MPS ]

  1. ; Version: 3.25
  2. ; Created: Friday, October 20, 1989 at 9:54:34 PM
  3. ;
  4. ; File: SysEqu.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1986-1992
  8. ; All Rights Reserved
  9. ;
  10. ;___________________________________________________________________________
  11. ;
  12. ; System Equates -- This file defines the low-level equates for the
  13. ; Macintosh software. This is divided into two pieces for
  14. ; assembly space and speed considerations. The wholeSystem flag is used
  15. ; to include the less common equates which realizes a complete set. The
  16. ; comments marked with ";+" denote categories or managers. Record
  17. ; stuctures may have additional private equates which are defined by and
  18. ; reserved for use by Apple Computer, Inc.
  19. ;
  20. ;___________________________________________________________________________
  21.  
  22.     IF &TYPE('__IncludingSysEqu__') = 'UNDEFINED' THEN
  23. __IncludingSysEqu__    SET    1
  24.  
  25.                   IF          (&TYPE('wholeSystem') = 'UNDEFINED') THEN
  26. wholeSystem       EQU         1
  27.                   ENDIF
  28.  
  29. ; ioFlags:
  30. noCacheBit        EQU             5                     ; disable cacheing for this operation  <S333/15Dec87>
  31. noCache            EQU          $20                 ; constant for noCacheBit   <S333/15Dec87>
  32.  
  33. PCDeskPat         EQU         $20B                      ; desktop pat, top bit only! others are in use
  34. HiKeyLast         EQU         $216                      ; Same as KbdVars
  35. KbdLast           EQU         $218                      ; Same as KbdVars+2
  36. ExpandMem         EQU         $2B6                      ; pointer to expanded memory block
  37.  
  38. ; Test Manager EQUs
  39. videoMagic        EQU         $5A932BC7                 ; When VideoInfoOk contains this value, the video card is ok (CritErr).
  40.  
  41. ; Unit table size constants (Used in startInit.a)
  42. unitEntries       EQU         64                        ; default # of entries in unit table
  43. maxUTEntries      EQU         unitEntries+64            ; Set Max higher so the table can grow.
  44. bgnSlotUnit       EQU         48                        ; default start unit number for slots.
  45. bgnSlotRef        EQU         -(bgnSlotUnit+1)          ; default start RefNum for slots.
  46.  
  47. ; Start Boot state constants.
  48. sbState0          EQU         0                         ; StartBoot code is at state-0.
  49. sbState1          EQU         1                         ; StartBoot code is at state-1.
  50.  
  51. ; system alarm
  52.  
  53. alrmFlEnable      EQU         0                         ; 1 => alarm clock mechanism is triggered
  54. ; Apple Desktop Bus
  55. JADBProc          EQU         1720                      ; (long) procedure called on ADBReInit
  56.  
  57. ; start at $C00
  58.  
  59. SCSIBase          EQU         $0C00                     ; (long) base address for SCSI chip read
  60. SCSI2Base          EQU         $1FF0                     ; (long) base address for 2nd SCSI chip            <?>
  61. SCSIDMA           EQU         $0C04                     ; (long) base address for SCSI DMA
  62. SCSIHsk           EQU         $0C08                     ; (long) base address for SCSI handshake
  63. SCSIGlobals       EQU         $0C0C                     ; (long) ptr for SCSI mgr locals
  64. RGBBlack          EQU         $0C10                     ; (6 bytes) the black field for color
  65. RGBWhite          EQU         $0C16                     ; (6 bytes) the white field for color
  66.  
  67. RowBits           EQU         $0C20                     ; (word) screen horizontal pixels
  68. ColLines          EQU         $0C22                     ; (word) screen vertical pixels
  69. ScreenBytes       EQU         $0C24                     ; (long) total screen bytes
  70.  
  71.  
  72. NMIFlag           EQU         $0C2C                     ; (byte) flag for NMI debounce
  73. VidType           EQU         $0C2D                     ; (byte) video board type ID
  74. ScrnInval        EQU            $0C2D                    ; (byte) replaces obscure VidType.  When $FFFF, scrn resource is
  75.                                                     ;        valid.  When cleared, scrn resource is invalid.
  76. VidMode           EQU         $0C2E                     ; (byte) video mode (4=4bit color)
  77. SCSIPoll          EQU         $0C2F                     ; (byte) poll for device zero only once.
  78.  
  79.  
  80. SEVarBase         EQU         $0C30                     ; ($0C30-0CB0) 128 bytes for sys err data
  81. ; note!!! - if changed, need to change also in hwequ file
  82.  
  83. MMUFlags          EQU         $0CB0                     ; (byte) cleared to zero (reserved for future use)
  84. MMUType           EQU         $0CB1                     ; (byte) kind of MMU present
  85. MMU32bit          EQU         $0CB2                     ; (byte) boolean reflecting current machine MMU mode
  86. MMUTbl            EQU         $0CB4                     ; (long) pointer to MMU Mapping table
  87. MMUTblSize        EQU         $0CB8                     ; (long) size of the 24 bit mode MMU mapping table
  88. MMU24Info         EQU         $0CB4                      ; (long) ptr to 24 bit mode MMU configuration info
  89. MMU32Info         EQU         $0CB8                     ; (long) ptr to 32 bit mode MMU configuration info
  90. SInfoPtr          EQU         $0CBC                     ; (long) pointer to Slot manager information
  91. ASCBase           EQU         $0CC0                     ; (long) pointer to Sound Chip
  92. SMGlobals         EQU         $0CC4                     ; (long) pointer to Sound Manager Globals
  93. TheGDevice        EQU         $0CC8                     ; (long) the current graphics device
  94. CQDGlobals        EQU         $0CCC                     ; (long) quickDraw global extensions
  95.  
  96. ; TEMPORARY EQUATE
  97. DeskCPat          EQU         $0CD8                     ; [PixPatHandle] Handle to desk pixPat
  98.  
  99. TimeVIADB         EQU         $0CEA                     ; (word) number of iter's of VIA access & DBRA.    <1.3>
  100.  
  101. VIA2               EQU         $0CEC                     ; VIA2 base address [pointer]                    <2.7>
  102. RBV                EQU            VIA2                    ; RBV base address [pointer] share with VIA2    <2.7>
  103. VIA2RBV           EQU         VIA2                     ; VIA2 or RBV base address [pointer]            <1.3><2.7>
  104. OSS                EQU            VIA2                    ; OSS base address [pointer] share with VIA2    <2.7>
  105. VIA2RBVOSS       EQU         VIA2                     ; VIA2 or RBV or OSS base address [pointer]        <2.7>
  106. VISA            EQU            VIA2                    ; VISA base address [pointer]                    <11>
  107. V8                EQU            VIA2                    ; V8 base address [pointer]
  108.  
  109. WarmStart         EQU         $0CFC                     ; (long) flag to indicate it is a warm start
  110. wmStConst         EQU         $574C5343                 ; warm start constant
  111. sleepConst        EQU         'SARA'                    ; waking from sleep constant
  112. TimeDBRA          EQU         $0D00                     ; (word) number of iterations of DBRA per millisecond
  113. TimeSCCDB         EQU         $0D02                     ; (word) number of iter's of SCC access & DBRA.
  114.  
  115. PmgrBase          EQU         $0D18                      ; Lomem pointer to power manager vars
  116.  
  117. TableSeed         EQU         $0D20                     ; (long) seed value for color table ID's
  118. SRsrcTblPtr       EQU         $0D24                     ; (long) pointer to slot resource table.
  119. JVBLTask          EQU         $0D28                     ; vector to slot VBL task interrupt handler
  120. WMgrCPort         EQU         $0D2C                     ; window manager color port
  121. VertRRate         EQU         $0D30                     ; (word) Vertical refresh rate for start manager.
  122.  
  123. ChunkyDepth       EQU         $0D60                     ; depth of the pixels
  124. CrsrPtr           EQU         $0D62                     ; pointer to cursor save area
  125. PortList          EQU         $0D66                     ; list of grafports
  126. MickeyBytes       EQU         $0D6A                     ; long pointer to cursor stuff
  127. QDErr             EQU         $0D6E                     ; QuickDraw error code [word]
  128. VIA2DT            EQU         $0D70                     ; 32 bytes for VIA2 dispatch table for NuMac
  129.  
  130. SInitFlags        EQU         $0D90                     ; StartInit.a flags [word]
  131. DTQueue           EQU         $0D92                     ; (10 bytes) deferred task queue header
  132. DTQFlags          EQU         $0D92                     ; flag word for DTQueue
  133. DTskQHdr          EQU         $0D94                     ; ptr to head of queue
  134. DTskQTail         EQU         $0D98                     ; ptr to tail of queue
  135. JDTInstall        EQU         $0D9C                     ; (long) ptr to deferred task install routine
  136. HiliteRGB         EQU         $0DA0                     ; 6 bytes: rgb of hilite color
  137. DSCtrAdj          EQU         $0DA8                     ; (long) Center adjust for DS rect.
  138. IconTLAddr        EQU         $0DAC                     ; (long) pointer to where start icons are to be put.
  139. VideoInfoOK       EQU         $0DB0                     ; (long) Signals to CritErr that the Video card is ok
  140. EndSRTPtr         EQU         $0DB4                     ; (long) Pointer to the end of the Slot Resource Table (Not the SRT buffer).
  141. SDMJmpTblPtr      EQU         $0DB8                     ; (long) Pointer to the SDM jump table
  142. JSwapMMU          EQU         $0DBC                     ; (long) jump vector to SwapMMU routine
  143. SdmBusErr         EQU         $0DC0                     ; (long) Pointer to the SDM busErr handler
  144. LastTxGDevice     EQU         $0DC4                     ; (long) copy of TheGDevice set up for fast text measure
  145.  
  146. NewCrsrJTbl       EQU         $88C                      ; location of new crsr jump vectors
  147. NewCrsrJCnt       EQU         1                         ; 2 new vectors
  148. JAllocCrsr        EQU         $88C                      ; (long) vector to routine that allocates cursor
  149. JSetCCrsr         EQU         $890                      ; (long) vector to routine that sets color cursor
  150. JOpcodeProc       EQU         $894                      ; (long) vector to process new picture opcodes
  151. CRSRBASE          EQU         $898                      ; (long) scrnBase for cursor
  152. CrsrDevice        EQU         $89C                      ; (long) current cursor device
  153. SrcDevice         EQU         $8A0                      ; (LONG) Src device for Stretchbits
  154. MainDevice        EQU         $8A4                      ; (long) the main screen device
  155. DeviceList        EQU         $8A8                      ; (long) list of display devices
  156. CRSRROW           EQU         $8AC                      ; (word) rowbytes for current cursor screen
  157. QDColors          EQU         $8B0                      ; (long) handle to default colors
  158.  
  159. ; QuickDraw
  160.  
  161. HiliteMode        EQU         $938                      ; used for color highlighting
  162.  
  163.  
  164. ; Exception vectors
  165.  
  166. ResetSP            EQU            $00                ; reset initial interrupt SP                     <32> rb
  167. ResetPC            EQU            $04                ; reset initial Program counter                    <32> rb
  168. BusErrVct         EQU         $08               ; bus error vector
  169. AddrVector        EQU            $C                ; address error
  170. IlglVector        EQU            $10                ; illegal instruction
  171. ZeroVector        EQU            $14                ; divide by 0
  172. CheckVector        EQU            $18                ; check bounds error
  173. TrapVVector        EQU            $1C                ; trapv location
  174. PrivlgVector    EQU            $20                ; privilege violation
  175. TraceVector        EQU            $24                ; trace exception vector
  176. Line1010          EQU         $28               ; 1010 emulator trap (system routines)
  177. Line1111          EQU         $2C               ; 1111 emulator trap (reserved)
  178. DebugVector        EQU            Line1111        ; debug instructions
  179. FmtErrVect        EQU         $38               ; format error vector for 68010/68020
  180. BadIntVector    EQU            $60                ; spurious interrupt
  181. AutoInt1          EQU         $64               ; level 1 auto-vector
  182. AutoInt2          EQU         $68               ; level 2 auto-vector
  183. AutoInt3          EQU         $6C               ; level 3 auto-vector
  184. AutoInt4          EQU         $70               ; level 4 auto-vector
  185. AutoInt5          EQU         $74               ; level 5 auto-vector
  186. AutoInt6          EQU         $78               ; level 6 auto-vector
  187. AutoInt7          EQU         $7C               ; level 7 auto-vector
  188. BkptVector        EQU            $B8                ; break loc
  189. BSUNVector        EQU            $C0                ; BSUN for FP Emulation Code                        <32> rb
  190. UNFLVector        EQU            $CC                ; Underflow for FP Emulation Code                    <32> rb
  191. OPERRVector        EQU            $D0                ; Operand Error for FP Emulation Code                <32> rb
  192. OVFLVector        EQU            $D4                ; Overflow for FP Emulation Code                    <32> rb
  193. SNANVector        EQU            $D8                ; Signal NAN for FP Emulation Code                    <32> rb
  194. UNIMPDTVector    EQU            $DC                ; 040 Unimplemented Data Type for FP Emulation Code    <32> rb
  195.  
  196. ;-------------
  197. ; MMU Equates
  198. ;-------------
  199.  
  200. ; MMU Mode bits
  201. ;
  202. ; type MMU_Mode = (true32b,false32b)
  203.  
  204. false32b          EQU         0                         ; modified
  205. true32b           EQU         1
  206.  
  207. ;+ System Error Handler
  208.  
  209. RestProc          EQU         $A8C                      ; Resume procedure f InitDialogs [pointer]
  210.  
  211. ; equates for queue elements
  212.  
  213. sIQType           EQU         6                         ; slot interrupt queue element ID
  214.  
  215. ;Default Startup
  216.  
  217. ;DefaultRec offsets for set/get default startup
  218.  
  219. drDriveNum        EQU         0                         ; [INTEGER]
  220. drRefNum          EQU         2                         ; [INTEGER]
  221.  
  222. ; Deferred Task Queue Element
  223.  
  224. dtQType           EQU         7                         ; deferred task queue element ID
  225. inDTQ             EQU         6                         ; bit index for "in deferred task" flag
  226. dtLink            EQU         0                         ; Link to next element [pointer]
  227. dtType            EQU         4                         ; Unique ID for validity [word]
  228. dtFlags           EQU         6                         ; optional flags [word]
  229. dtAddr            EQU         8                         ; service routine [pointer]
  230. dtParm            EQU         $C                        ; optional A1 parameter [long]
  231. dtResrvd          EQU         $10                       ; reserved [long]
  232. dtQElSize         EQU         20                        ; length of DT queue element in bytes
  233.  
  234.  
  235. ; Topanga video mode for Esprit
  236. NTSC               EQU         $B3E                      ; A byte                        <v2.1>
  237.  
  238.  
  239. ;+ ROM Equates
  240.  
  241. ROM85             EQU         $28E                      ; (word) actually high bit - 0 for ROM vers $75 (sic) and later
  242. ROMMapHndl        EQU         $B06                      ; (long) handle of ROM resource map
  243.  
  244. ;+ Screen Equates
  245.  
  246. ScrVRes           EQU         $102                      ; screen vertical dots/inch [word]
  247. ScrHRes           EQU         $104                      ; screen horizontal dots/inch [word]
  248. ScrnBase          EQU         $824                      ; Screen Base [pointer]
  249. ScreenRow         EQU         $106                      ; rowBytes of screen [word]
  250.  
  251.  
  252. ; Mouse/Keyboard
  253.  
  254. MBTicks           EQU         $16E                      ; tick count @ last mouse button [long]
  255. JKybdTask         EQU         $21A                      ; keyboard VBL task hook [pointer]
  256. KeyLast           EQU         $184                      ; ASCII for last valid keycode [word]
  257. KeyTime           EQU         $186                      ; tickcount when KEYLAST was rec'd [long]
  258. KeyRepTime        EQU         $18A                      ; tickcount when key was last repeated [long]
  259.  
  260. ;+ Parameter RAM (a twenty byte copy of the real parameter ram).
  261.  
  262. SPConfig          EQU         $1FB                      ; config bits: 4-7 A, 0-3 B (see use type below)
  263. SPPortA           EQU         $1FC                      ; SCC port A configuration [word]
  264. SPPortB           EQU         $1FE                      ; SCC port B configuration [word]
  265.  
  266. ; SCC Serial Chip Addresses
  267.  
  268. SCCRd             EQU         $1D8                      ; SCC base read address [pointer]
  269. SCCWr             EQU         $1DC                      ; SCC base write address [pointer]
  270.  
  271. ; Serial port use type
  272.  
  273. useFree           EQU         0                         ; Use undefined
  274. useATalk          EQU         1                         ; AppleTalk
  275. useAsync          EQU         2                         ; Async
  276. useExtClk         EQU         3                         ; externally clocked
  277.  
  278. ; Unpacked, user versions of parameter ram
  279.  
  280. DoubleTime        EQU         $2F0                      ; double click ticks [long]
  281. CaretTime         EQU         $2F4                      ; caret blink ticks [long]
  282. KeyThresh         EQU         $18E                      ; threshold for key repeat [word]
  283. KeyRepThresh      EQU         $190                      ; key repeat speed [word]
  284. SdVolume          EQU         $260                      ; Global volume(sound) control [byte]
  285.  
  286.  
  287. ;+ System Clocks
  288.  
  289. Ticks             EQU         $16A                      ; Tick count, time since boot [long]
  290. Time              EQU         $20C                      ; clock time (extrapolated) [long]
  291.  
  292.  
  293. ;+ Cursor
  294.  
  295. iBeamCursor       EQU         1                         ; text selection cursor
  296. crossCursor       EQU         2                         ; for structured selection
  297. plusCursor        EQU         3                         ; for drawing graphics
  298. watchCursor       EQU         4                         ; for indicating a long delay
  299.  
  300.  
  301. ; result codes for Relstring call
  302.  
  303. sortsBefore       EQU         -1                        ; str1 < str2
  304. sortsEqual        EQU         0                         ; str1 = str2
  305. sortsAfter        EQU         1                         ; str1 > str2
  306.  
  307. ;+ Queue Package
  308.  
  309. qInUse            EQU         7                         ; queue-in-use flag bit
  310.  
  311. ; Header Record
  312.  
  313. qHeadSize         EQU         $A                        ; queue header size
  314. qFlags            EQU         0                         ; miscellaneous flags [word]
  315. qHead             EQU         2                         ; first element in queue [pointer]
  316. qTail             EQU         6                         ; last element in queue [pointer]
  317.  
  318. ; General Purpose Queue Element Definition
  319.  
  320. qLink             EQU         0                         ; link to next queue element [pointer]
  321. qType             EQU         4                         ; queue element type [word]
  322.  
  323.  
  324. ;+ Event Manager
  325.  
  326. evType            EQU         4                         ; event queue element is type 4
  327.  
  328. ; Event Type Numbers (in EvtNum)
  329.  
  330. everyEvent        EQU         -1
  331. nullEvt           EQU         0                         ; event 0 is the null event
  332. mButDwnEvt        EQU         1                         ; mouse button down is event 1
  333. mButUpEvt         EQU         2                         ; mouse button up is event 2
  334. keyDwnEvt         EQU         3                         ; key down is event 3
  335. keyUpEvt          EQU         4                         ; key up is event 4
  336. autoKeyEvt        EQU         5                         ; auto-repeated key is event 5
  337. updatEvt          EQU         6                         ; update event
  338. diskInsertEvt     EQU         7                         ; disk-inserted event
  339. activateEvt       EQU         8                         ; activate/deactive event
  340. osEvt            EQU            $F                        ; suspend/resume/mousemoved
  341. kHighLevelEvent    EQU            $17                        ; high-level event
  342.  
  343. ; Event Mask Equates
  344. ; (same constant names are masks rather than bit numbers in higher level languages.
  345. ; Only special one is highLevelEvtBit, since it has only indirect correspondence to
  346. ; kHighLevelEvent. 
  347.  
  348. highLevelEvtBit    EQU            $A                        ; for kHighLevelEvent
  349.  
  350. ; Event Message Equates
  351.  
  352. charCodeMask          EQU         $000000FF
  353. keyCodeMask           EQU         $0000FF00
  354. adbAddrMask           EQU         $00FF0000
  355. osEvtMessageMask       EQU         $FF000000
  356.  
  357. ; osEvt Messages.  Event (sub)code is in the high byte of the message field.
  358. mouseMovedMessage        EQU     $FA ;
  359. suspendResumeMessage    EQU     $01 ;
  360. resumeFlag                EQU     0    ; Bit 0 of message field indicates resume vs suspend }
  361. convertClipboardFlag    EQU     1    ; Bit 1 in resume message indicates clipboard change }
  362.  
  363. ; Modifier bits in event record
  364. ; (same constant names are masks rather than bit numbers in higher level languages.)
  365.  
  366. activeFlag        EQU         $0                        ; activate? (activateEvt and mouseDown)
  367. btnState          EQU         $7                        ; state of button?
  368. cmdKey            EQU         $8                        ; command key down?
  369. shiftKey          EQU         $9                        ; shift key down?
  370. alphaLock         EQU         $A                        ; alpha lock down?
  371. optionKey         EQU         $B                        ; option key down?
  372. controlKey        EQU         $C                        ; control key down?
  373.  
  374. ; Event Record Definition
  375.  
  376. evtNum            EQU         0                         ; event code [word]
  377. evtMessage        EQU         2                         ; event message [long]
  378. evtTicks          EQU         6                         ; ticks since startup [long]
  379. evtMouse          EQU         $A                        ; mouse location [long]
  380. evtMeta           EQU         $E                        ; state of modifier keys [byte]
  381. evtMBut           EQU         $F                        ; state of mouse button [byte]
  382. evtBlkSize        EQU         $10                       ; size in bytes of the event record
  383. MonkeyLives       EQU         $100                      ; monkey lives if >= 0 [word]
  384. SEvtEnb           EQU         $15C                      ; enable SysEvent calls from GNE [byte]
  385. JournalFlag       EQU         $8DE                      ; journaling state [word]
  386. JournalRef        EQU         $8E8                      ; Journalling driver's refnum [word]
  387.  
  388. ; Obsolete Event Manager Equates
  389.  
  390. netWorkEvt        EQU         $A                        ; network event
  391. ioDrvrEvt         EQU         $B                        ; driver-defined event
  392. app1Evt           EQU         $C                        ; application defined events
  393. app2Evt           EQU         $D
  394. app3Evt           EQU         $E
  395. app4Evt           EQU         $F
  396.  
  397. ;+ Memory Manager
  398.  
  399. ; Master pointer bits for handles - USE _HLock, _HPurge, etc. for portability
  400.  
  401. lock              EQU         7                         ; lock bit in a master pointer
  402. purge             EQU         6                         ; bit for purgeable/unpurgeable
  403. resource          EQU         5                         ; bit to flag a resource handle
  404.  
  405.  
  406. BufPtr            EQU         $10C                      ; top of application memory [pointer]
  407. StkLowPt          EQU         $110                      ; Lowest stack as measured in VBL task [pointer]
  408. TheZone           EQU         $118                      ; current heap zone [pointer]
  409. ApplLimit         EQU         $130                      ; application limit [pointer]
  410. SysZone           EQU         $2A6                      ; system heap zone [pointer]
  411. ApplZone          EQU         $2AA                      ; application heap zone [pointer]
  412. HeapEnd           EQU         $114                      ; end of heap [pointer]
  413. HiHeapMark        EQU         $BAE                      ; (long) highest address used by a zone below sp
  414. MemErr            EQU         $220                      ; last memory manager error [word]
  415. maxSize           EQU         $800000                   ; outrageously large memory mgr request
  416. dfltStackSize     EQU         $00002000                 ; 8K size for stack
  417. mnStackSize       EQU         $00000400                 ; 1K minimum size for stack
  418.  
  419. ; _InitZone argument table.
  420.  
  421. startPtr          EQU         0                         ; Start address for zone [pointer]
  422. limitPtr          EQU         4                         ; Limit address for zone [pointer]
  423. cMoreMasters      EQU         8                         ; Number of masters to allocate at time [word]
  424. pGrowZone         EQU         10                        ; growZone procedure [pointer]
  425.  
  426. ; Control/Status Call Codes
  427.  
  428. killCode          EQU         1                         ; KillIO code
  429. drvStsCode        EQU         8                         ; status call code for drive status
  430. ejectCode         EQU         7                         ; control call eject code
  431. tgBuffCode        EQU         8                         ; set tag buffer code
  432.  
  433. ; Driver flags, (Bit definitions for DCtlFlags byte)
  434.  
  435. dReadEnable       EQU         0                         ; enabled for read operations
  436. dWritEnable       EQU         1                         ; enabled for writing
  437. dCtlEnable        EQU         2                         ; enabled for control operations
  438. dStatEnable       EQU         3                         ; enabled for status operations
  439. dNeedGoodBye      EQU         4                         ; needs a "goodbye kiss"
  440. dNeedTime         EQU         5                         ; needs "main thread" time
  441. dNeedLock         EQU         6                         ; needs to be accessed at interrupt level
  442.  
  443. ; Run-Time flags, (Bit definitions for DCtlFlags+1 byte)
  444.  
  445. dOpened           EQU         5                         ; bit to mark driver 'Open'
  446. dRAMBased         EQU         6                         ; 1=RAM-based Driver, 0=ROM-based
  447. drvrActive        EQU         7                         ; bit to mark the driver active
  448.  
  449. ; Drive queue element offsets
  450.  
  451. dQDrive           EQU         $6                        ; drive number [word]
  452. dQRefNum          EQU         $8                        ; driver refnum [word]
  453. dQFSID            EQU         $A                        ; file system handling this drive [word]
  454. dQDrvSz           EQU         $C                        ; number of blocks this drive [word]
  455. dQDrvSz2          EQU         $E                        ; if qType = 1, high word of drive size
  456.  
  457. ; Queue Element Type Definitions
  458.  
  459. ioQType           EQU         2                         ; I/O queue element is type 2
  460. drvQType          EQU         3                         ; timer queue element is type 3
  461. fsQType           EQU         5                         ; File System VCB element
  462. slpQType        EQU            $10                        ; Sleep queue element is type 16        <v1.2>
  463. btQType            EQU            21                        ; B*Tree Manager
  464.  
  465. ; Device Control Entry Definition
  466. ;dCtlEntrySize used to be only 40 bytes!
  467.  
  468. dCtlEntrySize     EQU         $34                       ; length of a DCE [52 bytes]
  469. dCtlDriver        EQU         0                         ; driver [handle]
  470. dCtlFlags         EQU         4                         ; flags [word]
  471. dCtlQueue         EQU         6                         ; queue header
  472. dCtlQHead         EQU         8                         ; queue first-element [pointer]
  473. dCtlQTail         EQU         $C                        ; queue last-element [pointer]
  474. dCtlPosition      EQU         $10                       ; position [long]
  475. dCtlStorage       EQU         $14                       ; driver's private storage [handle]
  476. dCtlRefNum        EQU         $18                       ; refNum of this driver [word]
  477. dCtlCurTicks      EQU         $1A                       ; counter for timing systemTask calls [long]
  478. dCtlWindow        EQU         $1E                       ; driver's window (if any) [pointer]
  479. dCtlDelay         EQU         $22                       ; number of ticks between sysTask calls [word]
  480. dCtlEMask         EQU         $24                       ; desk accessory event mask [word]
  481. dCtlMenu          EQU         $26                       ; menu ID associated with driver [word]
  482. dCtlSlot          EQU         $28                       ; device slot Number [byte]
  483. dCtlSlotId        EQU         $29                       ; device Id within slot [byte]
  484. dCtlDevBase       EQU         $2A                       ; driver scratch ptr/offset from base to device [long]
  485. dCtlOwner         EQU         $2E                       ; ptr to task control block(ownership) [Ptr]
  486. dCtlExtDev        EQU         $32                       ; Id of external device [byte]
  487.  
  488.  
  489. ; Driver Globals
  490.  
  491. UTableBase        EQU         $11C                      ; unit I/O table [pointer]
  492. UnitNtryCnt       EQU         $1D2                      ; count of entries in unit table [word]
  493. JFetch            EQU         $8F4                      ; fetch a byte routine for drivers [pointer]
  494. JStash            EQU         $8F8                      ; stash a byte routine for drivers [pointer]
  495. JIODone           EQU         $8FC                      ; IODone entry location [pointer]
  496.  
  497. ;Chooser
  498.  
  499. chooserID         EQU         1                         ; caller value for the chooser
  500.  
  501. ;+ I/O System
  502.  
  503. ; File positioning modes for ioPosMode field of I/O record
  504.  
  505. fsAtMark          EQU         0                         ; at current position of mark
  506. fsFromStart       EQU         1                         ; offset relative to beginning of file
  507. fsFromLEOF        EQU         2                         ; offset relative to logical end-of-file
  508. fsFromMark        EQU         3                         ; offset relative to current mark
  509. rdVerify          EQU         $40                       ; read verify mode
  510.  
  511. ; Permission values for ioPermssn field of I/O record
  512.  
  513. fsCurPerm         EQU         0                         ; whatever is currently allowed
  514. fsRdPerm          EQU         1                         ; request to read only
  515. fsWrPerm          EQU         2                         ; request to write only
  516. fsRdWrPerm        EQU         3                         ; request to read and write
  517. fsRdWrShPerm      EQU         4                         ; request for shared read and write
  518.  
  519. ; I/O record (general fields with trap-specific ones listed below)
  520.  
  521. ioQElSize         EQU         $32                       ; length of I/O parameter block [50 bytes]
  522. ioLink            EQU         $0                        ; queue link in header [pointer]
  523. ioType            EQU         $4                        ; type for safety check [byte]
  524. ioTrap            EQU         $6                        ; the trap [word]
  525. ioCmdAddr         EQU         $8                        ; address to dispatch to [pointer]
  526. ioCompletion      EQU         $C                        ; completion routine [pointer]
  527. ioResult          EQU         $10                       ; I/O result code [word]
  528. ioFileName        EQU         $12                       ; file name pointer [pointer]
  529. ioVRefNum         EQU         $16                       ; volume refnum [word]
  530. ioDrvNum          EQU         $16                       ; drive number [word]
  531. ioRefNum          EQU         $18                       ; file reference number [word]
  532. ioFileType        EQU         $1A                       ; specified along with FileName [byte]
  533.  
  534. ; specific fields for _Read, _Write
  535.  
  536. ioBuffer          EQU         $20                       ; data buffer [pointer]
  537. ioByteCount       EQU         $24                       ; requested byte count [long]
  538. ioNumDone         EQU         $28                       ; actual byte count completed [long]
  539. ioPosMode         EQU         $2C                       ; initial file positioning mode/eol char [word]
  540. ioPosOffset       EQU         $2E                       ; file position offset [long]
  541.  
  542. ; specific fields for _Allocate
  543.  
  544. ioReqCount        EQU         $24                       ; requested new size [long]
  545. ioActCount        EQU         $28                       ; actual byte count allocated [long]
  546.  
  547. ; specific fields for _Open
  548.  
  549. ioPermssn         EQU         $1B                       ; permissions [byte]
  550. ioOwnBuf          EQU         $1C                       ; "private" 522-byte buffer [pointer]
  551.  
  552. ; specific fields for _Rename
  553.  
  554. ioNewName         EQU         $1C                       ; new name pointer [pointer]
  555.  
  556. ; specific fields for _GetFileInfo, _SetFileInfo
  557.  
  558. ioFQElSize        EQU         $50                       ; File command parameter length [80 bytes]
  559. ioFDirIndex       EQU         $1C                       ; directory index of file [word]
  560. ioFlAttrib        EQU         $1E                       ; in-use bit=7, lock bit=0 [byte]
  561. ioFFlType         EQU         $1F                       ; file type [byte]
  562. ioFlUsrWds        EQU         $20                       ; finder info [16 bytes]
  563. ioFFlNum          EQU         $30                       ; file number [long]
  564. ioFlStBlk         EQU         $34                       ; start file block (0000 if none) [word]
  565. ioFlLgLen         EQU         $36                       ; logical length (EOF) [long]
  566. ioFlPyLen         EQU         $3A                       ; physical length in bytes [long]
  567. ioFlRStBlk        EQU         $3E                       ; resource fork's start file block [word]
  568. ioFlRLgLen        EQU         $40                       ; resource fork's logical length (EOF) [long]
  569. ioFlRPyLen        EQU         $44                       ; resource fork's physical length [long]
  570. ioFlCrDat         EQU         $48                       ; creation date & time [long]
  571. ioFlMdDat         EQU         $4C                       ; last modification date & time [long]
  572.  
  573. ; Specific fields for _GetEOF, _SetEOF
  574.  
  575. ioLEOF            EQU         $1C                       ; logical end-of-file [long]
  576.  
  577. ; Specific fields for _SetFileType
  578.  
  579. ioNewType         EQU         $1C                       ; new type byte [byte]
  580.  
  581. ; Specific fields for _GetVolInfo, _GetVolume, _SetVolume, _MountVol, _UnmountVol,
  582. ; _Eject. Note that these traps have a bigger record size.
  583.  
  584. ioVQElSize        EQU         $40                       ; Volume command parameter length [64 bytes]
  585. ioVDrvNum         EQU         $16                       ; drive or volume number [word]
  586. ioVNPtr           EQU         $12                       ; name buffer (or zero) [pointer]
  587. ioVolIndex        EQU         $1C                       ; volume index number [word]
  588. ioVCrDate         EQU         $1E                       ; creation date & time [long]
  589. ioVLsBkUp         EQU         $22                       ; last backup date & time [long]
  590. ioVAtrb           EQU         $26                       ; Volume attributes [word]
  591. ioVNmFls          EQU         $28                       ; # files in directory [word]
  592. ioVDirSt          EQU         $2A                       ; start block of file dir [word]
  593. ioVBlLn           EQU         $2C                       ; length of dir in blocks [word]
  594. ioVNmAlBlks       EQU         $2E                       ; num blks (of alloc size) this dev [word]
  595. ioVAlBlkSiz       EQU         $30                       ; alloc blk byte size [long]
  596. ioVClpSiz         EQU         $34                       ; bytes to try to allocate at a time [long]
  597. ioAlBlSt          EQU         $38                       ; starting block in block map [word]
  598. ioVNxtFNum        EQU         $3A                       ; next free file number [long]
  599. ioVFrBlk          EQU         $3E                       ; # free alloc blks for this vol [word]
  600.  
  601. ; Catalog structure equates:
  602.  
  603. fsRtParID         EQU         1                         ; DirID of parent's root
  604. fsRtDirID         EQU         2                         ; Root DirID
  605. fsXTCNID          EQU         3                         ; Extent B*-Tree file ID
  606. fsCTCNID          EQU         4                         ; Catalog B*-Tree file ID
  607. fsBBCNID        EQU            5                        ; Bad Block "file" ID
  608. fsUsrCNID         EQU         $10                       ; First assignable user CNode ID
  609.  
  610. ; Additional equates for all calls:
  611.  
  612. ioDirID           EQU         $30                       ; directory ID
  613. ioHQElSize        EQU            $34                        ; size of a standard HFS call queue element
  614.  
  615. ; Additional equates for catalog information return:
  616.  
  617. ioFlBkDat         EQU         $50                       ; File's last backup date
  618. ioFlxFndrInfo     EQU         $54                       ; File's additional finder info bytes
  619. ioFlParID         EQU         $64                       ; File's parent directory ID
  620. ioFlClpSiz        EQU         $68                       ; File's clump size, in bytes
  621.  
  622. ; Additional equates for directory information return:
  623.  
  624. ioDirFlg          EQU         4                         ; Bit in ioFlAttrb set to indicate directory
  625. ioDrUsrWds        EQU         $20                       ; Directory's user info bytes
  626. ioDrDirID         EQU         $30                       ; Directory ID
  627. ioDrNmFls         EQU         $34                       ; Number of files in a directory
  628. ioDrCrDat         EQU         $48                       ; Directory creation date
  629. ioDrMdDat         EQU         $4C                       ; Directory modification date
  630. ioDrBkDat         EQU         $50                       ; Directory backup date
  631. ioDrFndrInfo      EQU         $54                       ; Directory finder info bytes
  632. ioDrParID         EQU         $64                       ; Directory's parent directory ID
  633. ioHFQElSiz        EQU         $6C                       ; Size of a Hierarchical File Queue Element
  634.  
  635. ; Additional equates for _TFGetVolInfo:
  636.  
  637. ioVLsMod          EQU         $22                       ; Last modification date
  638. ioVSigWord        EQU         $40                       ; Volume signature
  639. ioVCBVBMst        EQU         $2A
  640. ioVNxtCNID        EQU         $3A
  641. ioVDrvInfo        EQU         $42                       ; Drive number (0 if volume is offline)
  642. ioVDRefNum        EQU         $44                       ; Driver refNum
  643. ioVFSID           EQU         $46                       ; ID of file system handling this volume
  644. ioVBkup           EQU         $48                       ; Last backup date (0 if never backed up)
  645. ioVSeqNum         EQU         $4C                       ; Sequence number of this volume in volume set
  646. ioVWrCnt          EQU         $4E                       ; Volume write count
  647. ioVFilCnt         EQU         $52                       ; Total number of files on volume
  648. ioVDirCnt         EQU         $56                       ; Total number of directories on the volume
  649. ioVFndrInfo       EQU         $5A                       ; Finder information for volume
  650. ioHVQElSize       EQU         $7A                       ; Length of Hierarchical Volume information PB
  651.  
  652. ; fields for _GetFCBInfo:
  653.  
  654. ioFCBIndx         EQU         $1C                       ; FCB index for _GetFCBInfo
  655. ioFCBFiller1      EQU         $1E                       ; filler
  656. ioFCBFlNm         EQU         $20                       ; File number
  657. ioFCBFlags        EQU         $24                       ; FCB flags
  658. ioFCBStBlk        EQU         $26                       ; File start block
  659. ioFCBEOF          EQU         $28                       ; Logical end-of-file
  660. ioFCBPLen         EQU         $2C                       ; Physical end-of-file
  661. ioFCBCrPs         EQU         $30                       ; Current file position
  662. ioFCBVRefNum      EQU         $34                       ; Volume refNum
  663. ioFCBClpSiz       EQU         $36                       ; File clump size
  664. ioFCBParID        EQU         $3A                       ; Parent directory ID
  665. ioFCBQElSize      EQU         $3E                       ; extended size of FCBPBRec
  666.  
  667. ; fields for _GetWDInfo:
  668.  
  669. ioWDIndex         EQU         $1A                       ; Working Directory index for _GetWDInfo
  670. ioWDProcID        EQU         $1C                       ; WD's ProcID (long)
  671. ioWDVRefNum       EQU         $20                       ; WD's Volume RefNum (word)
  672. ioWDDirID         EQU         $30                       ; WD's DirID (long)
  673.  
  674. ; fields for _FSControl call:
  675.  
  676. ioFSVrsn          EQU         $20                       ; File system version
  677.  
  678. ; field for CatMove
  679.  
  680. ioNewDirID        EQU         $24                       ; destination directory for CatMove
  681.  
  682. ; fields for GetLogInInfo
  683.  
  684. ioObjNamePtr    EQU            $1C                        ; pointer to buffer for name of log-in
  685.  
  686. ; fields for GetDirAccess and SetDirAccess
  687.  
  688. ioACOwnerID        EQU            $24                        ; owner field of parameter block
  689. ioACGroupID        EQU            $28                        ; group field of parameter block
  690. ioACAccess        EQU            $2C                        ; access privileges
  691.  
  692. ; values of user IDs and group IDs
  693.  
  694. noUser            EQU            0                        ; no user
  695. administratorUser    EQU        1                        ; administrator’s user number
  696. noGroup            EQU            0                        ; no group
  697.  
  698. ; values of access privileges
  699.  
  700. fullPrivileges    EQU            $00070007                ; all privileges for everybody and owner
  701. ownerPrivileges EQU            $00000007                ; all privileges for owner only
  702.                 
  703. ; Specific fields for CatSearch
  704.  
  705. ioMatchPtr        EQU        $18                    ; match buffer pointer
  706. ioReqMatchCount EQU        $1C                    ; maximum match count
  707. ioActMatchCount EQU        $20                    ; actual match count
  708. ioSearchBits    EQU        $24                    ; search criteria selector
  709. ioSearchInfo1    EQU        $28                    ; search values and range lower bounds
  710. ioSearchInfo2    EQU        $2C                    ; search values and range upper bounds
  711. ioSearchTime    EQU        $30                    ; length of time to run search
  712. ioCatPosition    EQU        $34                    ; catalog position information
  713. ioOptBuffer        EQU        $44                    ; optional read buffer
  714. ioOptBufSize    EQU        $48                    ; length of optional read buffer
  715.  
  716. ; Specific fields for FileID calls
  717.  
  718. ioNamePtr         EQU        $12                    ; name ptr of file 
  719. ioDestNamePtr    EQU        $1C                 ; name ptr of destination file (FIDExchangeFiles only)
  720. ioDestDirID        EQU        $24                    ; directory id of destination file (FIDExchangeFiles only)
  721. ioSrcDirID      EQU        $30                    ; directory id of file specified. 
  722. ioFileID        EQU        $36                    ; file id of file
  723.  
  724. ; Specific fields for Get/SetForeignPrivs
  725. ioForeignPrivInfo1    EQU        $2C
  726. ioForeignPrivInfo2    EQU        $30
  727. ioForeignPrivInfo3    EQU        $34
  728. ioForeignPrivInfo4    EQU        $38
  729.  
  730. ; specific fields for MakeFSSpec
  731. ioFSSpecPtr            EQU        $1C
  732.  
  733. ; Specific fields for device _Open
  734.  
  735. ioMix             EQU         $1C                       ; General purpose field imported by driver[long]
  736. ioFlags           EQU         $20                       ; General purpose flags [word]
  737. ioSlot            EQU         $22                       ; Slot [byte]
  738. ioId              EQU         $23                       ; Id [byte]
  739. ioSEBlkPtr        EQU         $22                       ; Pointer to the seBlock [long]
  740.  
  741. ; ioFlags:
  742. fMulti            EQU         $00                       ; b0 = fMulti: ioSEBlkPtr is valid (ioSlot, ioId are invalid)
  743.  
  744. ; Specific fields for _Control, _Status
  745.  
  746. csCode            EQU         $1A                       ; control/status code [word]
  747. csParam           EQU         $1C                       ; operation-defined parameters [22 bytes]
  748.  
  749. ; FInfo (Finder Information) record layout
  750.  
  751. fdType            EQU         $0                        ; type of file [long]
  752. fdCreator         EQU         $4                        ; file's creator [long]
  753. fdFlags           EQU         $8                        ; flags [word]
  754. fdLocation        EQU         $A                        ; file's location [point]
  755. fdFldr            EQU         $E                        ; file's window [word]
  756.  
  757. ; added for HFS
  758.  
  759. ; FXInfo record layout
  760.  
  761. fdIconID          EQU         $0                        ; Icon ID [word]
  762. fdUnused          EQU         $2                        ; unused but reserved [3 words]
  763. fdScript        EQU            $8                        ; script flag and number [byte]
  764. fdXFlags        EQU            $9                        ; more flags bits [byte]
  765. fdComment         EQU         $A                        ; Comment ID [word]
  766. fdPutAway         EQU         $C                        ; Home Dir ID [2 words]
  767.  
  768. ; DInfo record layout
  769.  
  770. frRect            EQU         $0                        ; Folder Rect [4 words]
  771. frFlags           EQU         $8                        ; Flags [word]
  772. frLocation        EQU         $A                        ; Location [2 words]
  773. frView            EQU         $E                        ; Folder view [word]
  774.  
  775. ; DXInfo record layout
  776.  
  777. frScroll          EQU         $0                        ; scroll position [2 words]
  778. frOpenChain       EQU         $4                        ; dirID chain of open folders [2 words]
  779. frScript        EQU            $8                        ; script flag and number [byte]
  780. frXFlags        EQU            $9                        ; more flags bits [byte]
  781. frComment         EQU         $A                        ; comment [word]
  782. frPutAway         EQU         $C                        ; Dir ID [2 words]
  783.  
  784. ;end of addition
  785.  
  786. ; Masks for fdFlags field of FInfo record defined above
  787.  
  788. fOnDesk           EQU         1
  789. fHasBundle        EQU         8192                      ; set if file has a bundle
  790. fInvisible        EQU         16384                     ; set if file's icon is invisible
  791. fTrash            EQU         -3                        ; file is in Trash window
  792. fDeskTop          EQU         -2                        ; file is on desktop
  793. fDisk             EQU         0                         ; file is in disk window
  794.  
  795. ; File System Globals
  796.  
  797. DrvQHdr           EQU         $308                      ; queue header of drives in system [10 bytes]
  798. BootDrive         EQU         $210                      ; drive number of boot drive [word]
  799. EjectNotify       EQU         $338                      ; eject notify procedure [pointer]
  800. IAZNotify         EQU         $33C                      ; world swaps notify procedure [pointer]
  801. SFSaveDisk        EQU         $214                      ; last vRefNum seen by standard file [word]
  802. CurDirStore       EQU         46+$36A                   ; save dir across calls to Standard File [long]
  803.  
  804.  
  805. ;+ Date-Time record (for use with _Secs2Date, and _Date2Secs)
  806.  
  807. DateTimeRec     RECORD        0                        ; moved here from ScriptEqu.a <04/23/89 pke>
  808. year            DS.W        1
  809. month            DS.W        1
  810. day             DS.W        1
  811. hour            DS.W        1
  812. minute            DS.W        1
  813. second            DS.W        1
  814. dayOfWeek        DS.W        1
  815. DateTimeRecSize    EQU            *
  816. size            EQU            *
  817.                 ENDR
  818.  
  819. dtYear            EQU         $0                        ; year (1904..) [word]
  820. dtMonth           EQU         $2                        ; month (1..12) [word]
  821. dtDay             EQU         $4                        ; day (1..31) [word]
  822. dtHour            EQU         $6                        ; hour (0..23) [word]
  823. dtMinute          EQU         $8                        ; minute (0..59) [word]
  824. dtSecond          EQU         $A                        ; second (0..59) [word]
  825. dtDayOfWeek       EQU         $C                        ; day of week, sunday..saturday (1..7) [word]
  826.  
  827.  
  828. ;+ Miscellaneous stuff
  829.  
  830. OneOne            EQU         $A02                      ; constant $00010001 [long]
  831. MinusOne          EQU         $A06                      ; constant $FFFFFFFF [long]
  832. Lo3Bytes          EQU         $31A                      ; constant $00FFFFFF [long]
  833. ROMBase           EQU         $2AE                      ; ROM base address [pointer]
  834. RAMBase           EQU         $2B2                      ; RAM base address [pointer]
  835. SysVersion        EQU         $15A                      ; version # of RAM-based system [word]
  836. RndSeed           EQU         $156                      ; random seed/number [long]
  837.  
  838. ; fields for _GetDefaultStartup: [DefStartRec]
  839. ; SlotDev:
  840. sdExtDevID        EQU         $0                        ; [byte]
  841. sdPartition       EQU         $1                        ; [byte]
  842. sdSlotNum         EQU         $2                        ; [byte]
  843. sdSRsrcID         EQU         $3                        ; [byte]
  844. ; SCSIDev:
  845. sdReserved1       EQU         $0                        ; [byte]
  846. sdReserved2       EQU         $1                        ; [byte]
  847. sdRefNum          EQU         $2                        ; [word]
  848.  
  849. ; fields for _GetVideoDefault: [DefVideoRec]
  850.  
  851. sdSlot            EQU         $0                        ; [byte]
  852. sdSResource       EQU         $1                        ; [byte]
  853.  
  854. ; fields for _GetOSDefault: [DefOSRec]
  855.  
  856. sdReserved        EQU         $0                        ; [byte]
  857. sdOSType          EQU         $1                        ; [byte]
  858.  
  859.  
  860. ;+ Machine Name Resource
  861. nameRsrcID        EQU            -16395                    ; STR# rsrc in System file containing
  862.                                                     ; machine names.
  863.  
  864. ;+ SysEnvirons info
  865.  
  866.  
  867. SysEnvRec         RECORD      0
  868. environsVersion DS.W        1
  869. machineType       DS.W        1
  870. systemVersion     DS.W        1
  871. processor         DS.W        1
  872. hasFPU            DS.B        1
  873. hasColorQD        DS.B        1
  874. keyBoardType      DS.W        1
  875. atDrvrVersNum     DS.W        1
  876. sysVRefNum        DS.W        1
  877.                   ALIGN       2
  878. sysEnv1Size       EQU         *-SysEnvRec               ; size for version 1
  879. size            EQU            *
  880.                   ENDR
  881.  
  882. curSysEnvVers     EQU         2                         ; latest SysEnvirons version
  883.  
  884. ; return values
  885.  
  886. envXL             EQU         -2                        ; for the glue (double sigh)
  887. envMac            EQU         -1                        ; for the glue (sigh)
  888. envMachUnknown    EQU         0
  889. env512KE          EQU         1
  890. envMacPlus        EQU         2
  891. envSE             EQU         3
  892. envMacII          EQU         4
  893. envMacIIx          EQU         5
  894. envMacIIcx         EQU         6
  895. envSE30           EQU         7
  896. envPortable        EQU            8
  897. envMacIIci        EQU            9
  898. envMacIIfx        EQU            11
  899.  
  900. envCPUUnknown     EQU         0                         ; CPU types
  901. env68000          EQU         1
  902. env68010          EQU         2
  903. env68020          EQU         3
  904. env68030          EQU         4
  905. env68040        EQU            5                        ; <4.8>
  906.  
  907. envUnknownKbd     EQU         0                         ; Keyboard types
  908. envMacKbd         EQU         1
  909. envMacAndPad      EQU         2
  910. envMacPlusKbd     EQU         3
  911. envAExtendKbd     EQU         4
  912. envStandADBKbd    EQU         5
  913. envPrtblADBKbd    EQU            6                        ; <4.9>
  914. envPrtblISOKbd    EQU            7
  915. envStdISOADBKbd    EQU            8
  916. envExtISOADBKbd    EQU            9
  917.  
  918.  
  919. ;+ Scratch Areas
  920.  
  921. Scratch20         EQU         $1E4                      ; scratch [20 bytes]
  922. Scratch8          EQU         $9FA                      ; scratch [8 bytes]
  923.  
  924.  
  925. ;+ Scrap Manager
  926.  
  927. ScrapSize         EQU         $960                      ; scrap length [long]
  928. ScrapHandle       EQU         $964                      ; memory scrap [handle]
  929. ScrapCount        EQU         $968                      ; validation byte [word]
  930. ScrapState        EQU         $96A                      ; scrap state [word]
  931. ScrapName         EQU         $96C                      ; pointer to scrap name [pointer]
  932.  
  933.  
  934. ;+ Desk Accessories
  935.  
  936.  
  937. ; Message Definitions (in CSCode of control call)
  938.  
  939. accEvent          EQU         $40                       ; event message from SystemEvent
  940. accRun            EQU         $41                       ; run message from SystemTask
  941. accCursor         EQU         $42                       ; cursor message from SystemTask
  942. accMenu           EQU         $43                       ; menu message from SystemMenu
  943. accUndo           EQU         $44                       ; undo message from SystemEdit
  944. accCut            EQU         $46                       ; cut message from SystemEdit
  945. accCopy           EQU         $47                       ; copy message from SystemEdit
  946. accPaste          EQU         $48                       ; paste message from SystemEdit
  947. accClear          EQU         $49                       ; clear message from SystemEdit
  948. goodBye           EQU         -1                        ; goodbye message
  949.  
  950.  
  951.                   IF          wholeSystem=1 THEN
  952.  
  953. ;International stuff
  954.  
  955. IntlSpec          EQU         $BA0                      ; (long) - ptr to extra Intl data
  956.  
  957. ;Switcher
  958.  
  959. SwitcherTPtr      EQU         $286                      ; Switcher's switch table
  960.  
  961. ; Trap bits for memory manager
  962.  
  963. tSysOrCurZone     EQU         10                        ; bit set implies System Zone
  964. ; bit clear implies Current Zone
  965. clearBit          EQU         9                         ; bit set means clear allocated memory.
  966.  
  967.  
  968. ; Peripheral chips and Magic Hardware addresses
  969.  
  970. CPUFlag           EQU         $12F                      ; $00=68000, $01=68010, $02=68020 (old ROM inits to $00)
  971. cpu68000        EQU            0
  972. cpu68010        EQU            1
  973. cpu68020        EQU            2
  974. cpu68030        EQU            3
  975. cpu68040        EQU            4
  976.  
  977. ; VIA (6522) interface chip
  978.  
  979. VIA               EQU         $1D4                      ; VIA base address [pointer]
  980.  
  981. ; Disk Address
  982.  
  983. IWM               EQU         $1E0                      ; IWM base address [pointer]
  984.  
  985.  
  986. ; Interrupt secondary vectors
  987.  
  988. Lvl1DT            EQU         $192                      ; Interrupt level 1 dispatch table [32 bytes]
  989. Lvl2DT            EQU         $1B2                      ; Interrupt level 2 dispatch table [32 bytes]
  990. ExtStsDT          EQU         $2BE                      ; SCC ext/sts secondary dispatch table [16 bytes]
  991.  
  992.  
  993.  
  994. ; Parameter Ram
  995.  
  996. SPValid           EQU         $1F8                      ; validation field ($A7) [byte]
  997. SPATalkA          EQU         $1F9                      ; AppleTalk node number hint for port A
  998. SPATalkB          EQU         $1FA                      ; AppleTalk node number hint for port B
  999. SPAlarm           EQU         $200                      ; alarm time [long]
  1000. SPFont            EQU         $204                      ; default application font number minus 1 [word]
  1001. SPKbd             EQU         $206                      ; kbd repeat thresh in 4/60ths [2 4-bit]
  1002. SPPrint           EQU         $207                      ; print stuff [byte]
  1003. SPVolCtl          EQU         $208                      ; volume control [byte]
  1004. SPClikCaret       EQU         $209                      ; double click/caret time in 4/60ths[2 4-bit]
  1005. SPMisc1           EQU         $20A                      ; miscellaneous [1 byte]
  1006. SPMisc2           EQU         $20B                      ; miscellaneous [1 byte]
  1007. GetParam          EQU         $1E4                      ; system parameter scratch [20 bytes]
  1008. SysParam          EQU         $1F8                      ; system parameter memory [20 bytes]
  1009.  
  1010. ; Cursor
  1011.  
  1012. CrsrThresh        EQU         $8EC                      ; delta threshold for mouse scaling [word]
  1013. JCrsrTask         EQU         $8EE                      ; address of CrsrVBLTask [long]
  1014. MTemp             EQU         $828                      ; Low-level interrupt mouse location [long]
  1015. RawMouse          EQU         $82C                      ; un-jerked mouse coordinates [long]
  1016. CrsrRect          EQU         $83C                      ; Cursor hit rectangle [8 bytes]
  1017. TheCrsr           EQU         $844                      ; Cursor data, mask & hotspot [68 bytes]
  1018. CrsrAddr          EQU         $888                      ; Address of data under cursor [long]
  1019. CrsrSave          EQU         $88C                      ; data under the cursor [64 bytes]
  1020. CrsrVis           EQU         $8CC                      ; Cursor visible? [byte]
  1021. CrsrBusy          EQU         $8CD                      ; Cursor locked out? [byte]
  1022. CrsrNew           EQU         $8CE                      ; Cursor changed? [byte]
  1023. CrsrState         EQU         $8D0                      ; Cursor nesting level [word]
  1024. CrsrObscure       EQU         $8D2                      ; Cursor obscure semaphore [byte]
  1025.  
  1026. ; Mouse/Keyboard
  1027.  
  1028. KbdVars           EQU         $216                      ; Keyboard manager variables [4 bytes]
  1029. KbdType           EQU         $21E                      ; keyboard model number [byte]
  1030. MBState           EQU         $172                      ; current mouse button state [byte]
  1031. KeyMap            EQU         $174                      ; bitmap of the keyboard [2 longs]
  1032. KeypadMap         EQU         $17C                      ; bitmap for numeric pad-18bits [long]
  1033. Key1Trans         EQU         $29E                      ; keyboard translator procedure [pointer]
  1034. Key2Trans         EQU         $2A2                      ; numeric keypad translator procedure [pointer]
  1035. JGNEFilter        EQU         $29A                      ; GetNextEvent filter proc [pointer]
  1036. KeyMVars          EQU         $B04                      ; (word) for ROM KEYM proc state
  1037. Mouse             EQU         $830                      ; processed mouse coordinate [long]
  1038. CrsrPin           EQU         $834                      ; cursor pinning rectangle [8 bytes]
  1039. CrsrCouple        EQU         $8CF                      ; cursor coupled to mouse? [byte]
  1040. CrsrScale         EQU         $8D3                      ; cursor scaled? [byte]
  1041. MouseMask         EQU         $8D6                      ; V-H mask for ANDing with mouse [long]
  1042. MouseOffset       EQU         $8DA                      ; V-H offset for adding after ANDing [long]
  1043.  
  1044. ; System Clocks
  1045.  
  1046. AlarmState        EQU         $21F                      ; Bit7=parity, Bit6=beeped, Bit0=enable [byte]
  1047.  
  1048.  
  1049. ;+ Vertical Blanking Interrupt Handler
  1050.  
  1051. ; VBL Block Queue Element
  1052.  
  1053. vType             EQU         1                         ; VBL queue element is type 1
  1054. inVbl             EQU         6                         ; bit index for "in VBL" flag
  1055. vblink            EQU         0                         ; Link to next element [pointer]
  1056. vblType           EQU         4                         ; Unique ID for validity [word]
  1057. vblAddr           EQU         6                         ; service routine [pointer]
  1058. vblCount          EQU         $A                        ; timeout count [word]
  1059. vblPhase          EQU         $C                        ; phase count [word]
  1060. VBLQueue          EQU         $160                      ; VBL queue header [10 bytes]
  1061.  
  1062. ; Event manager
  1063.  
  1064. jPlayCtl          EQU         16                        ; playBack call
  1065. jRecordCtl        EQU         17                        ; record call
  1066. jcTickCount       EQU         0                         ; journal code for TickCount
  1067. jcGetMouse        EQU         1                         ; journal code for GetMouse
  1068. jcButton          EQU         2                         ; journal code for Button
  1069. jcGetKeys         EQU         3                         ; journal code for GetKeys
  1070. jcEvent           EQU         4                         ; journal code for GetNextEvent(Avail)
  1071. SysEvtMask        EQU         $144                      ; system event mask [word]
  1072. SysEvtBuf         EQU         $146                      ; system event queue element buffer [pointer]
  1073. EventQueue        EQU         $14A                      ; event queue header [10 bytes]
  1074. EvtBufCnt         EQU         $154                      ; max number of events in SysEvtBuf - 1 [word]
  1075.  
  1076. ; Event Queue Element Data Stucture
  1077.  
  1078. evtQWhat          EQU         6                         ; event code [word]
  1079. evtQMessage       EQU         8                         ; event message [long]
  1080. evtQWhen          EQU         $C                        ; ticks since startup [long]
  1081. evtQWhere         EQU         $10                       ; mouse location [long]
  1082. evtQMeta          EQU         $14                       ; state of modifier keys [byte]
  1083. evtQMBut          EQU         $15                       ; state of mouse button [byte]
  1084. evtQBlkSize       EQU         $16                       ; size of event record counting queue info
  1085.  
  1086. ; flags in flags field in heapzone header
  1087.  
  1088. fOnCheck          EQU         0                         ; Turn On Checking
  1089. fChecking         EQU         1                         ; Checking on
  1090. fNSelCompct       EQU         4                         ; Use non-selective compact algorithm when 1.
  1091. fNoRvrAlloc       EQU         5                         ; Don't use rover allocation scheme when 1.
  1092. fNSelPurge        EQU         6                         ; Use non-selective purge algorithm when 1.
  1093. fRelAtEnd         EQU         7                         ; MakeBk packs rels at end of free bk when 1.
  1094. ROZ               EQU         $0                        ; bit in flags field of MemMgr zone header
  1095.  
  1096. ; Block Types
  1097.  
  1098. tybkMask          EQU         3                         ; Mask for block type
  1099. tybkFree          EQU         0                         ; Free Block
  1100. tybkNRel          EQU         1                         ; Non-Relocatable
  1101. tybkRel           EQU         2                         ; Relocatable
  1102.  
  1103. ; Block Offsets
  1104.  
  1105. tagBC             EQU         0                         ; Tag and Byte Count field [long]
  1106. handle            EQU         4                         ; back pointer to master pointer [pointer]
  1107. blkData           EQU         8                         ; data starts here
  1108.  
  1109. ; Heap Zone header
  1110.  
  1111. bkLim             EQU         $0                        ; last block in zone [pointer]
  1112. purgePtr          EQU         $4                        ; roving purge placeholder [pointer]
  1113. hFstFree          EQU         $8                        ; first free handle [pointer]
  1114. zcbFree           EQU         $C                        ; # of free bytes in zone [long]
  1115. gzProc            EQU         $10                       ; grow zone procedure [pointer]
  1116. mAllocCnt         EQU         $14                       ; # of master ptrs to allocate [word]
  1117. flags             EQU         $16                       ; Flags [word]
  1118. cntRel            EQU         $18                       ; # of allocated relocatable blocks [word]
  1119. maxRel            EQU         $1A                       ; max # of allocated rel. blocks [word]
  1120. cntNRel           EQU         $1C                       ; # of allocated non-rel. blocks [word]
  1121. maxNRel           EQU         $1E                       ; max # of allocated non-rel. blocks [word]
  1122. cntEmpty          EQU         $20                       ; # of empty handles [word]
  1123. cntHandles        EQU         $22                       ; total # of handles [word]
  1124. minCBFree         EQU         $24                       ; min # of bytes free [long]
  1125. purgeProc         EQU         $28                       ; purge warning procedure [pointer]
  1126. allocPtr          EQU         $30                       ; roving allocator [pointer]
  1127. heapData          EQU         $34                       ; start of heap zone data
  1128.  
  1129.  
  1130.  
  1131. GZRootHnd         EQU         $328                      ; root handle for GrowZone [handle]
  1132. GZRootPtr         EQU         $32C                      ; root pointer for GrowZone [pointer]
  1133. GZMoveHnd         EQU         $330                      ; moving handle for GrowZone [handle]
  1134. MemTop            EQU         $108                      ; top of memory [pointer]
  1135. MmInOK            EQU         $12E                      ; initial memory mgr checks ok? [byte]
  1136. HpChk             EQU         $316                      ; heap check RAM code [pointer]
  1137. MaskBC            EQU         $31A                      ; Memory Manager Byte Count Mask [long]
  1138. MaskHandle        EQU         $31A                      ; Memory Manager Handle Mask [long]
  1139. MaskPtr           EQU         $31A                      ; Memory Manager Pointer Mask [long]
  1140. MinStack          EQU         $31E                      ; min stack size used in InitApplZone [long]
  1141. DefltStack        EQU         $322                      ; default size of stack [long]
  1142. MMDefFlags        EQU         $326                      ; default zone flags [word]
  1143.  
  1144. ;+ System Error Handler
  1145.  
  1146. DSAlertTab        EQU         $2BA                      ; system error alerts [pointer]
  1147. DSAlertRect       EQU         $3F8                      ; rectangle for disk-switch alert [8 bytes]
  1148. DSDrawProc        EQU         $334                      ; alternate syserror draw procedure [pointer]
  1149. DSWndUpdate       EQU         $15D                      ; GNE not to paintBehind DS AlertRect? [byte]
  1150. WWExist           EQU         $8F2                      ; window manager initialized? [byte]
  1151. QDExist           EQU         $8F3                      ; quickdraw is initialized [byte]
  1152. ResumeProc        EQU         $A8C                      ; Resume procedure from InitDialogs [pointer]
  1153. DSErrCode         EQU         $AF0                      ; last system error alert ID
  1154.  
  1155. ;+ Drivers
  1156.  
  1157. dskRfN            EQU         $FFFB                     ; 3.5" disk reference number
  1158. IntFlag           EQU         $15F                      ; reduce interrupt disable time when bit 7 = 0
  1159.  
  1160. ; Serial I/O Driver
  1161.  
  1162. SerialVars        EQU         $2D0                      ; async driver variables [16 bytes]
  1163. ABusVars          EQU         $2D8                      ; Pointer to AppleTalk local variables
  1164. ABusDCE           EQU         $2DC                      ; Pointer to AppleTalk DCE
  1165. PortAUse          EQU         $290                      ; bit 7: 1 = not in use, 0 = in use
  1166. ; bits 0-3: current use of port (see use type)
  1167. ; bits 4-6: user specific
  1168. PortBUse          EQU         $291                      ; port B use, same format as PortAUse
  1169. SCCASts           EQU         $2CE                      ; SCC read reg 0 last ext/sts rupt - A [byte]
  1170. SCCBSts           EQU         $2CF                      ; SCC read reg 0 last ext/sts rupt - B [byte]
  1171.  
  1172. ; Serial handshake record definition
  1173.  
  1174. shFXOn            EQU         $0                        ; XOn/XOff output control flags [byte]
  1175. shFCTS            EQU         $1                        ; CTS hardware handshake flag [byte]
  1176. shXOn             EQU         $2                        ; XOn character [byte]
  1177. shXOff            EQU         $3                        ; XOff character [byte]
  1178. shErrs            EQU         $4                        ; errors that cause abort [byte]
  1179. shEvts            EQU         $5                        ; status changes that cause events [byte]
  1180. shFInX            EQU         $6                        ; XOn/XOff input flow control flag [byte]
  1181. shNull            EQU         $7                        ; not used [byte]
  1182.  
  1183. ; Serial status record definition
  1184.  
  1185. ssCumErrs         EQU         $0                        ; cumulative errors [byte]
  1186. ssXOffSent        EQU         $1                        ; XOff sent as input control flag [byte]
  1187. ssRdPend          EQU         $2                        ; read pending flag [byte]
  1188. ssWrPend          EQU         $3                        ; write pending flag [byte]
  1189. ssCTSHold         EQU         $4                        ; CTS flow control hold flag [byte]
  1190. ssXOffHold        EQU         $5                        ; XOff received as output flow control [byte]
  1191.  
  1192. ; Disk Driver
  1193.  
  1194. ; Driver Code Header (for I/O drivers, desk accessories)
  1195.  
  1196. drvrFlags         EQU         $0                        ; various flags and permissions [word]
  1197. drvrDelay         EQU         $2                        ; # of ticks between systask calls [word]
  1198. drvrEMask         EQU         $4                        ; event mask [word]
  1199. drvrMenu          EQU         $6                        ; driver menu ID [word]
  1200. drvrOpen          EQU         $8                        ; open routine offset [word]
  1201. drvrPrime         EQU         $A                        ; prime routine offset [word]
  1202. drvrCtl           EQU         $C                        ; control routine offset [word]
  1203. drvrStatus        EQU         $E                        ; status routine offset [word]
  1204. drvrClose         EQU         $10                       ; warmstart reset routine offset [word]
  1205. drvrName          EQU         $12                       ; length byte and name of driver [string]
  1206. ;drvrVersion EQU ??? ; Driver w/ highest version # installed [word]
  1207. ; This field's offset varies depending upon the length
  1208. ; of the Name field preceding it. It must be word aligned!
  1209.  
  1210. ; Driver Status record definition
  1211.  
  1212. dsTrack           EQU         $0                        ; current track [word]
  1213. dsWriteProt       EQU         $2                        ; bit 7=1 if volume locked [byte]
  1214. dsDiskInPlace     EQU         $3                        ; disk in place [byte]
  1215. dsInstalled       EQU         $4                        ; drive installed [byte]
  1216. dsSides           EQU         $5                        ; bit 7=0 if single-sided drive [byte]
  1217. dsQLink           EQU         $6                        ; next queue entry [pointer]
  1218. dsDQVers          EQU         $A                        ; 1 for HD20 [word]
  1219. dsDQDrive         EQU         $C                        ; drive number [word]
  1220. dsDQRefNum        EQU         $E                        ; driver reference number [word]
  1221. dsDQFSID          EQU         $10                       ; file-system identifier [word]
  1222. dsTwoSideFmt      EQU         $12                       ; -1 if two-sided disk [byte]
  1223. dsDiskErrs        EQU         $14                       ; error count [word]
  1224. dsDrvSize         EQU         $12                       ; drive block size low word [word]
  1225. dsDrvS1           EQU         $14                       ; drive block size high word [word]
  1226. dsDrvType         EQU         $16                       ; 1 for HD20 [word]
  1227. dsDrvManf         EQU         $18                       ; 1 for Apple Computer, Inc [word]
  1228. dsDrvChar         EQU         $1A                       ; 230 ($E6) for HD20 [word]
  1229. dsDrvMisc         EQU         $1C                       ; 0 -- reserved [byte]
  1230.  
  1231.  
  1232. DskErr            EQU         $142                      ; disk routine result code [word]
  1233. PWMBuf2           EQU         $312                      ; PWM buffer 1 (or 2 if sound) [pointer]
  1234.  
  1235. ; Drive command codes
  1236.  
  1237. dcRead            EQU         0
  1238. dcWrite           EQU         1
  1239. dcStatus          EQU         3
  1240. dcInit            EQU         25
  1241. dcScan            EQU         26
  1242.  
  1243. ; Sound Stuff
  1244.  
  1245. SoundPtr          EQU         $262                      ; 4VE sound definition table [pointer]
  1246. SoundBase         EQU         $266                      ; sound bitMap [pointer]
  1247. SoundVBL          EQU         $26A                      ; vertical retrace control element [16 bytes]
  1248. SoundDCE          EQU         $27A                      ; sound driver DCE [pointer]
  1249. SoundActive       EQU         $27E                      ; sound is active? [byte]
  1250. SoundLevel        EQU         $27F                      ; current level in buffer [byte]
  1251. CurPitch          EQU         $280                      ; current pitch value [word]
  1252.  
  1253. ; I/O System
  1254.  
  1255. noQueueBit        EQU         $9                        ; tells I/O system not to queue the request
  1256. asyncTrpBit       EQU         $A                        ; bit in high byte of trap specifying async
  1257. ToExtFS           EQU         $3F2                      ; hook for external file systems
  1258.  
  1259. ; File System Globals
  1260.  
  1261. DskVerify         EQU         $12C                      ; used by 3.5 disk driver for read/verify [byte]
  1262. TagData           EQU         $2FA                      ; sector tag info for disk drivers [14 bytes]
  1263. BufTgFNum         EQU         $2FC                      ; file number [long]
  1264. BufTgFFlg         EQU         $300                      ; flags [word]
  1265. BufTgFBkNum       EQU         $302                      ; logical block number [word]
  1266. BufTgDate         EQU         $304                      ; time stamp [word]
  1267.  
  1268. ; I/O Command Equates for I/O Queue Elements (match trap numbers)
  1269.  
  1270. aRdCmd            EQU         2                         ; read command
  1271. aWrCmd            EQU         3                         ; write command
  1272. aCtlCmd           EQU         4                         ; control command
  1273. aStsCmd           EQU         5                         ; status command
  1274.  
  1275. ; fields for _SetPMSP call: PMSP = "Poor Man's Search Path"
  1276.  
  1277. ioPMSPFlg         EQU         $1A                       ; Flag whether to enable the PMSP
  1278. ioPMSPHook        EQU         $1C                       ; Pointer to PMSP hook proc
  1279.  
  1280. ; Print variables
  1281.  
  1282. ScrDmpEnb         EQU         $2F8                      ; screen dump enabled? [byte]
  1283. ScrDmpType        EQU         $2F9                      ; FF dumps screen, FE dumps front window [byte]
  1284.  
  1285. ; Scrap Variables
  1286.  
  1287. ScrapVars         EQU         $960                      ; scrap manager variables [32 bytes]
  1288. ScrapInfo         EQU         $960                      ; scrap length [long]
  1289. ScrapEnd          EQU         $980                      ; end of scrap vars
  1290. ScrapTag          EQU         $970                      ; scrap file name [STRING[15]]
  1291.  
  1292. ; Segment Loader
  1293.  
  1294. LaunchFlag        EQU         $902                      ; from launch or chain [byte]
  1295. SaveSegHandle     EQU         $930                      ; seg 0 handle [handle]
  1296. CurJTOffset       EQU         $934                      ; current jump table offset [word]
  1297. CurPageOption     EQU         $936                      ; current page 2 configuration [word]
  1298. LoaderPBlock      EQU         $93A                      ; param block for ExitToShell [10 bytes]
  1299. CurApRefNum       EQU         $900                      ; refNum of application's resFile [word]
  1300. CurrentA5         EQU         $904                      ; current value of A5 [pointer]
  1301. CurStackBase      EQU         $908                      ; current stack base [pointer]
  1302. CurApName         EQU         $910                      ; name of application [STRING[31]]
  1303. LoadTrap          EQU         $12D                      ; trap before launch? [byte]
  1304. SegHiEnable       EQU         $BB2                      ; (byte) 0 to disable MoveHHi in LoadSeg
  1305.  
  1306. ;device manager - Chooser message values
  1307.  
  1308. newSelMsg         EQU         12                        ; a new selection has been made
  1309. fillListMsg       EQU         13                        ; fill the list with choices to be made
  1310. getSelMsg         EQU         14                        ; mark one or more choices as selcted
  1311. selectMsg         EQU         15                        ; a choice has actually been made
  1312. deselectMsg       EQU         16                        ; a choice has been canceled
  1313. terminateMsg      EQU         17                        ; lets device package clean up
  1314. buttonMsg         EQU         19                        ; a button has been clicked
  1315. psAlert           EQU         6                         ; page setup alert bit in HiliteMode
  1316. theChooser        EQU         1
  1317.  
  1318. ; cdev message types
  1319. initDev           EQU         0                         ; Time for cdev to initialize itself
  1320. hitDev            EQU         1                         ; Hit on one of my items
  1321. closeDev          EQU         2                         ; Close yourself
  1322. nulDev            EQU         3                         ; Null event
  1323. updateDev         EQU         4                         ; Update event
  1324. activDev          EQU         5                         ; Activate event
  1325. deactivDev        EQU         6                         ; Deactivate event
  1326. keyEvtDev         EQU         7                         ; Key down/auto key
  1327. macDev            EQU         8                         ; Decide whether or not to show up
  1328. undoDev            EQU            9                        ; Edit menu undo  (cmd-z).
  1329. cutDev            EQU            10                        ; Edit menu cut   (cmd-x).
  1330. copyDev            EQU            11                        ; Edit menu copy  (cmd-c).
  1331. pasteDev        EQU            12                        ; Edit menu paste (cmd-v).
  1332. clearDev        EQU            13                        ; Edit menu clear.
  1333. cursorDev        EQU            14                        ; Cursor panel area.
  1334.  
  1335. ; Monitors control panel messages
  1336. initMsg            EQU            1                        ; initialization
  1337. okMsg            EQU            2                        ; user clicked OK button
  1338. cancelMsg        EQU            3                        ; user clicked Cancel button
  1339. hitMsg            EQU            4                        ; user clicked control in Options dialog
  1340. nulMsg            EQU            5                        ; periodic event
  1341. updateMsg        EQU            6                        ; update event
  1342. activateMsg        EQU            7                        ; not used
  1343. deactivateMsg    EQU            8                        ; not used
  1344. keyEvtMsg        EQU            9                        ; keyboard event
  1345. superMsg        EQU            10                        ; show superuser controls
  1346. normalMsg        EQU            11                        ; show only normal controls
  1347. startupMsg        EQU            12                        ; code has been loaded
  1348.  
  1349. ; cdev error codes
  1350. cdevGenErr        EQU         -1                        ; General error; gray cdev w/o alert
  1351. cdevMemErr        EQU         0                         ; Memory shortfall; alert user please
  1352. cdevResErr        EQU         1                         ; Couldn't get a needed resource; alert
  1353. cdevUnset         EQU         3                         ; cdevValue is initialized to this
  1354. ;___________________________________________________________________________
  1355. ;
  1356. ; Background Notification Manager
  1357.  
  1358. BNMQHd            EQU         $B60                      ; head of background notification Q
  1359.  
  1360. ;___________________________________________________________________________
  1361. ;
  1362. ; Communications Toolbox Globals Pointer
  1363.  
  1364. CommToolboxGlobals    EQU         $BB4                  ; [long] pointer to CTB Globals <8>
  1365.  
  1366.  
  1367. ;___________________________________________________________________________
  1368. ; Memory Manager
  1369.  
  1370. defaultPhysicalEntryCount EQU    8            ; default number of physical blocks in table
  1371.  
  1372. ; values returned from the GetPageState function
  1373.  
  1374. kPageInMemory          EQU            0
  1375. kPageOnDisk            EQU            1
  1376. kNotPaged              EQU            2
  1377.  
  1378. MemoryBlock            RECORD        0
  1379. address                DS.L        1            ; start of block
  1380. count                DS.L        1            ; size of block
  1381. size                EQU            *            ; size of MemoryBlock
  1382.                     ENDR
  1383.  
  1384. LogicalToPhysicalTable RECORD    0
  1385. logical                DS.B        MemoryBlock    ; logical block
  1386. physical            EQU            *            ; equivalent physical blocks
  1387. size                EQU            *            ; minimum size of table
  1388. defaultSize            EQU            size + (MemoryBlock.size * defaultPhysicalEntryCount)
  1389.                     ENDR
  1390.  
  1391. ;___________________________________________________________________________
  1392. ;
  1393.  
  1394. JDoEject          EQU         4*($F7)+$0400             ; Sony Driver jump vectors
  1395.  
  1396.  
  1397.                   ENDIF
  1398.  
  1399.     ENDIF    ; if not already included...